(deftemplate scoala
    (slot nume)
    (slot culoare(default null)))
(assert (scoala(nume school)))
(assert (scoala(nume bus)(culoare yellow)))
(assert (scoala(nume student)))
(deftemplate culori
    (slot nume))
(assert(culori(nume yellow)))
(assert(culori(nume blue)))
(assert(culori(nume red)))
(assert(culori(nume green)))
(deftemplate fructe
    (slot nume)
    (slot culoare(default null))
    (slot locatie(default null)))
(assert (fructe(nume banana)(culoare yellow)(locatie island)))
(assert (fructe(nume coconut)(locatie island)))
(assert (fructe(nume apple)(culoare red)))
(assert (fructe(nume plum)))
(deftemplate copac
    (slot nume)
    (multislot fruct))
(assert (copac(nume tree) (fruct banana coconut apple plum)))
(deftemplate locatie
    (slot nume)
    (multislot fruct2))
(assert (locatie (nume island) (fruct2 coconut banana)))

(facts)